# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dfir-ntfs
_pkgname=dfir_ntfs
pkgver=1.1.20
pkgrel=2
pkgdesc='An NTFS parser for digital forensics & incident response.'
arch=('any')
groups=('blackarch' 'blackarch-forensic')
url='https://github.com/msuhanov/dfir_ntfs'
license=('GPL')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/msuhanov/$_pkgname/archive/$pkgver.zip")
sha512sums=('4f4f40db4e6fce4c2f77f23aabdfa06f40e2f0c131c6e5151d58caeb10dc5f4764fd254e6f95582746110c64a511d1d41ca23f25d202f6746ead4f397421114c')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" ReadMe ChangeLog License

  for i in "$pkgdir/usr/bin/"*; do
    mv $i "$(echo $i | tr -s '_' '-')"
  done
}

